Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@thi.ng/diff
Advanced tools
Customizable diff implementations for arrays (sequential) & objects (associative), with or without linear edit logs
[!NOTE] This is one of 199 standalone projects, maintained as part of the @thi.ng/umbrella monorepo and anti-framework.
🚀 Please help me to work full-time on these projects by sponsoring me on GitHub. Thank you! ❤️
Customizable diff implementations for arrays (sequential) & objects (associative), with or without linear edit logs.
STABLE - used in production
Search or submit any issues for this package
yarn add @thi.ng/diff
ESM import:
import * as diff from "@thi.ng/diff";
Browser ESM import:
<script type="module" src="https://esm.run/@thi.ng/diff"></script>
For Node.js REPL:
const diff = await import("@thi.ng/diff");
Package sizes (brotli'd, pre-treeshake): ESM: 1.05 KB
Note: @thi.ng/api is in most cases a type-only import (not used at runtime)
import { diffArray } from "@thi.ng/diff";
// diff w/ default diff mode
diffArray([1, 2, 3], [1, 2, 4], "full");
// {
// distance: 2,
// adds: { 2: 4 },
// dels: { 2: 3 },
// const: { 0: 1, 1: 2 },
// linear: [0, 0, 1, 0, 1, 2, -1, 2, 3, 1, 2, 4]
// }
If this project contributes to an academic publication, please cite it as:
@misc{thing-diff,
title = "@thi.ng/diff",
author = "Karsten Schmidt",
note = "https://thi.ng/diff",
year = 2016
}
© 2016 - 2024 Karsten Schmidt // Apache License 2.0
FAQs
Customizable diff implementations for arrays (sequential) & objects (associative), with or without linear edit logs
The npm package @thi.ng/diff receives a total of 149 weekly downloads. As such, @thi.ng/diff popularity was classified as not popular.
We found that @thi.ng/diff demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.